<?php
/**
 * Project: HTPHouDuan
 * User: xilibo
 * Date: 2018/1/25
 */

use think\Route;

Route::get([
    'gw/index' => 'Gateway/index',  //网关
    'nodes' => 'SiteNode/index', //节点
    'api/games' => 'api/Game/index', //游戏列表
    'api/game/:ename' => 'api/Game/read', //游戏入口
    'api/users' => 'api/User/index', //用户列表
    'api/code' => 'api/UserAuth/code', //用户code认证
    'api/auth' => 'api/UserAuth/auth', //用户授权
    'api/logout' => 'api/User/logout', //用户登出
    'api/myrecharge' => 'api/User/myRecharge', //额度查询
    'api/balance' => 'api/User/balance', //余额查询
    'api/betcount' => 'api/User/betCount', //用户下注量统计
    'api/recharge' => 'api/User/recharge', //额度转换
    '/' => 'hpt/Index/index',
    '/g/:game' => 'hpt/Index/play',
]);

Route::post([
    'api/recharge' => 'api/User/recharge', //额度转换
    '/u' => 'hpt/Index/userInfo',
]);


return [
    '__pattern__' => [
        'uname' => '\w+',
        'username' => '\w+',
        'id' => '\d+',
    ],
];